package com.yang.order.controller;

import com.yang.order.service.OrderServiceImp;
import com.yang.springcloud.pojo.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class OrderController {
    @Autowired
    private OrderServiceImp orderServiceImp;

    @PostMapping("/orderinsert")
    public Map<String, Object> insertOrder(Order o) {

        return orderServiceImp.addOrder(o);
    }
}
